package cn.signalpha.modules.shop.excel;

import cn.signalpha.modules.shop.excel.converter.LogisticsTypeConverter;
import cn.signalpha.modules.shop.excel.converter.OrderStatusConverter;
import cn.signalpha.modules.shop.excel.converter.OrderTypeConverter;
import cn.signalpha.modules.shop.excel.converter.PayTypeConverter;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 视图实体类
 *
 * @author signalpha
 */
@Data
@ColumnWidth(20)
@ContentRowHeight(20)
public class OrderExcel implements Serializable {
	private static final long serialVersionUID = 1L;

	@ColumnWidth(20)
	@ExcelProperty(value = "订单编号")
	private String orderNo;

	@ColumnWidth(20)
	@ExcelProperty(value = "商户名称")
	private String sellerName;

	@ColumnWidth(25)
	@ExcelProperty(value = {"商品信息", "名称"})
	private String goodsName;

	@ColumnWidth(25)
	@ExcelProperty(value = {"商品信息", "规格"})
	private String goodsSpec;

	@ColumnWidth(8)
	@ExcelProperty(value = {"商品信息", "数量"})
	private Integer goodsNum;

	@ColumnWidth(8)
	@ExcelProperty(value = {"商品信息", "单价"})
	private Double goodsUnitPrice;

	@ColumnWidth(8)
	@ExcelProperty(value = {"商品信息", "总价"})
	private Double goodsTotalPrice;

	@ColumnWidth(10)
	@ExcelProperty(value = "状态", converter = OrderStatusConverter.class)
	private Integer orderStatus;

	@ColumnWidth(10)
	@ExcelProperty(value = "类型", converter = OrderTypeConverter.class)
	private Integer orderType;

	@ColumnWidth(12)
	@ExcelProperty(value = "总价")
	private Double goodsPrice;

	@ColumnWidth(12)
	@ExcelProperty(value = "实付")
	private Double orderPrice;

	@ColumnWidth(12)
	@ExcelProperty(value = "使用余额")
	private Double deductMoney;

	@ColumnWidth(12)
	@ExcelProperty(value = "使用积分")
	private Double deductIntegral;

	@ColumnWidth(12)
	@ExcelProperty(value = "店铺优惠")
	private Double deductCouponSeller;

	@ColumnWidth(12)
	@ExcelProperty(value = "系统优惠")
	private Double deductCouponSystem;

	@ColumnWidth(12)
	@ExcelProperty(value = "活动优惠")
	private Double deductPublicity;

	@ColumnWidth(12)
	@ExcelProperty(value = "支付方式", converter = PayTypeConverter.class)
	private Integer payType;

	@ColumnWidth(10)
	@ExcelProperty(value = {"收货信息", "类型"}, converter = LogisticsTypeConverter.class)
	private Integer logisticsType;

	@ColumnWidth(10)
	@ExcelProperty(value = {"收货信息", "姓名"})
	private String consignee;

	@ColumnWidth(13)
	@ExcelProperty(value = {"收货信息", "电话"})
	private String mobile;

	@ColumnWidth(10)
	@ExcelProperty(value = {"收货信息", "省"})
	private String province;

	@ColumnWidth(10)
	@ExcelProperty(value = {"收货信息", "市"})
	private String city;

	@ColumnWidth(10)
	@ExcelProperty(value = {"收货信息", "区"})
	private String district;

	@ColumnWidth(20)
	@ExcelProperty(value = {"收货信息", "地址"})
	private String address;

	@ExcelProperty(value = "下单时间")
	private Date createTime;

	@ExcelProperty(value = "支付时间")
	private Date payTime;

	@ExcelProperty(value = "发货时间")
	private Date sendTime;

	@ExcelProperty(value = "完成时间")
	private Date finishTime;

	@ExcelProperty(value = "买家留言")
	private String buyerRemark;

	@ExcelProperty(value = "卖家备注")
	private String sellerRemark;

}
